package com.mall.client.search;

import java.util.List;

import com.mall.pojo.Mall;
import com.mall.query.search.MallSearchQuery;
import com.mall.searchdo.SearchResultIdDO;

public interface MallLuceneBuildService {

	public void buildAll(List<Mall> mallList, String mallSearchDir);
	
	/**
	 * 搜索
	 * 
	 * @param eshopSearchQuery
	 * @param searchDir
	 * @param num
	 */
	public List<SearchResultIdDO> searchEshopFromLucene(MallSearchQuery mallSearchQuery, String searchDir, int num);
	
	/**
	 * 删除所有的索引
	 * 
	 * @param mallSearchDir
	 */
	public void mallBuildAllDelete(String mallSearchDir);
	
	/**
	 * 更新索引
	 * 
	 * @param saleEshopList
	 * @param eshopSearchDir
	 * @throws Exception
	 */
	public void update(List<Mall> mallList, String eshopSearchDir);
	
	/**
	 * 删除索引
	 * 
	 * @param ids
	 * @param eshopSearchDir
	 * @throws Exception
	 */
	public void deleteByIds(List<Long> ids, String eshopSearchDir);
	
}
